﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;

namespace Himp.Erp
{
    /// <summary>
    /// 物料库存
    /// </summary>
    public class MatlInv : FullAuditedAggregateRoot<Guid>, IMultiTenant
    {
        /// <summary>
        /// 所属仓储
        /// </summary>
        public Guid MatlWhseId { get; set; }

        /// <summary>
        /// 所属仓储
        /// </summary>
        public MatlWhse MatlWhse { get; set; }

        /// <summary>
        /// 物料信息
        /// </summary>
        public Guid MatlInfoId { get; set; }

        /// <summary>
        /// 物料信息
        /// </summary>
        public MatlInfo MatlInfo { get; set; }

        /// <summary>
        /// 库存变更类别编码
        /// </summary>
        public string InvChgTypeCode { get; set; }

        /// <summary>
        /// 库存变更类别名称
        /// </summary>
        public string InvChgTypeName { get; set; }

        /// <summary>
        /// 业务类别
        /// </summary>
        public EnumBizType BizType { get; set; }

        /// <summary>
        /// 业务Id
        /// </summary>
        public Guid? BizId { get; set; }

        /// <summary>
        /// 入库明细
        /// </summary>
        public Guid? InboundDetlId { get; set; }

        /// <summary>
        /// 入库明细
        /// </summary>
        public InboundDetl? InboundDetl { get; set; }

        /// <summary>
        /// 生产批号
        /// </summary>
        public string ManuLotnum { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        public string Bchno { get; set; }

        /// <summary>
        /// 有效期
        /// </summary>
        public DateTime ValiDate { get; set; }

        /// <summary>
        /// 当前库存标识
        /// </summary>
        public bool CurFlag { get; set; }

        /// <summary>
        /// 版本号
        /// </summary>
        public long Ver { get; set; }

        /// <summary>
        /// 总数量
        /// </summary>
        public decimal TotalCnt { get; set; }

        /// <summary>
        /// 操作数量
        /// </summary>
        public decimal ChgCnt { get; set; }

        /// <summary>
        /// 最终数量
        /// </summary>
        public decimal FinlCnt { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public Guid? TenantId { get; set; }
    }
}
